<!DOCTYPE html>
<html lang='zh-CN'>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

  <title>会员收货地址管理</title>
  <link href="css/bootstrap.min.css" rel="stylesheet">
  <link href="css/materialdesignicons.min.css" rel="stylesheet">
  <link href="css/animate.css" rel="stylesheet">
  <link href="css/style.min.css" rel="stylesheet">
  <link href="js/select2/select2.min.css" rel="stylesheet">
</head>
<body>
<div class="container-fluid p-t-15">

  <div class="row">
    <div class="col-md-12">
      <div class="card">
        <div class="card-header"><h4>收货地址</h4></div>
          <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="home">

              <form class="form-inline" method="post" id="searchForm">
                <div class="form-group">
                  <label>会员ID:</label>
                  <input type="text" class="form-control" name="memberId">
                </div>
                <div class="form-group">
                  <button class="btn btn-info btn_query btn-round"  type="button" id="searchFormBtn" >查询</button>
                </div>
              </form>
              <table id="address_data"></table>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>



<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/bootstrap-table/bootstrap-table.js"></script>
<script type="text/javascript" src="js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="js/zero2one/zero2one.version.js"></script>
<script type="text/javascript" src="js/zero2one/zero2one.core.js"></script>
<script type="text/javascript" src="js/dropzone/min/dropzone.min.js"></script>
<script type="text/javascript" src="js/bootstrapvalidator/dist/js/bootstrapValidator.js"></script>
<!-- bootstrap表单验证插件 -->
<script type="text/javascript" src="js/bootstrap-validator-master/dist/validator.js"></script>
<!-- jquery-form表单提交插件 -->
<script type="text/javascript" src="js/jquery-form/jquery.form.js"></script>
<!-- bootstrap弹出框插件 -->
<script type="text/javascript" src="js/jquery.bootstrap.min.js"></script>
<!-- 表单填充插件 -->
<script type="text/javascript" src="js/jquery-form/jquery.formloader.js"></script>

<script type="text/javascript">

  //设置表头
  var columns = [
    {checkbox: true},
    {field: 'id',title: 'ID',visible:false},
    {field: 'memberId',title: '会员ID'},
    {field: 'nickName',title: '会员昵称'},
    {field: 'address',title: '收货地址',formatter: function (value, row, index) {
      return row.provinceName+row.cityName+row.receiverName+row.streetAddr
      }},
    {field: 'regionName',title: '收货人名称'},
    {field: 'receivePhone',title: '收货人电话'},
    {field: 'isDefault',title: '是否是默认收货地址',formatter:function (value) {
           if (value==1){
             return "是"
           }else {
             return "否"
           }
      }}
  ];


  //进入主界面加载数据
  zero2one.datagrid("address_data", "/remote/address/queryAddress",function (params) {
    return $.extend(zero2one.tableInitParam(params), zero2one.form2json("searchForm"));
  }, columns);

  //点击查询按钮重新加载页面数据
  $("#searchFormBtn").click(function () {
    $('#address_data').bootstrapTable('refresh');
  });



</script>
</body>
</html>
